package xyz.xtgl.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import xyz.xtgl.config.helper.MyDispatcherServlet;
import xyz.xtgl.config.helper.PageConverter;
import xyz.xtgl.config.helper.QueryWrapperConverter;

/**
 * @author liubo
 * @created 2020-02-03 9:51
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Bean
    public PageConverter pageConverter(){
        return new PageConverter();
    }

    @Bean
    public QueryWrapperConverter queryWrapperConverter(){
        return new QueryWrapperConverter();
    }
    @Bean
    public DispatcherServlet dispatcherServlet(){
        return new MyDispatcherServlet();
    }
}
